<table id="camera">    
    <tr>
        <td>        
            <!-- Panneau d'affichage du flux video de la camera -->
            <div class='lightbluebox'>
                <div class='boxtopright'><div class='boxtopleft'></div></div>
                <div class='boxcontent'>
                    <div class="titre">
                        <h2>
                        Camera <?php echo $this->threadId;?> : <?php echo $this->threadName;?>
                        <?php
                        if ( $this->threadStatus == "on")
                        {
                            ?>
                            <a class="lienAjax" href="camera/detection?threadId=<?php echo $this->threadId; ?>&action=pause" target="content"><img src="imgweb/status-on.png" /></a>
                            <?php 
                        } else {
                            ?>
                            <a class="lienAjax" href="camera/detection?threadId=<?php echo $this->threadId; ?>&action=start" target="content"><img src="imgweb/status-off.png" /></a>
                            <?php
                        }
                        ?>
                        </h2>
                    </div>
    
                    <img class="vignette" src="<?php echo $this->threadPath; ?>" width="<?php echo $this->threadWidth;?>" height="<?php echo $this->threadHeight;?>" />            
                </div>
                <div class='boxbottomright'><div class='boxbottomleft'></div></div>
            </div>
            <!-- Fin du panneau d'affichage du flux video -->
        </td>       
        <td>
            <!-- Panel des fonctions de la camera  -->
            <div class='greenbox'>
                <div class='boxtopright'><div class='boxtopleft'></div></div>
                <div class='boxcontent'>

                            <h3 class="align-center">                            
                            <?php
                                if ( $this->threadStatus == "on")
                                {
                                    ?>                        
                                    <a class="lienAjax" href="camera/detection?threadId=<?php echo $this->threadId; ?>&action=pause" target="content">Desactiver l'enregistrement</a>
                                    <?php                       
                                } else
                                {
                                    ?>                        
                                    <a class="lienAjax" href="camera/detection?threadId=<?php echo $this->threadId; ?>&action=start" target="content">Activer l'enregistrement</a>
                                    <?php
                                }                    
                            ?>                               
                            </h3>
                            
                            <br />

                            <?php  if ( $this->userAllowed ) { ?>
                                <div id="bt-photo">
                                    <a class="lienAjax" title="Prendre une Photo" href="camera/snapshot?threadId=<?php echo $this->threadId; ?>" target="content">Prendre une photo</a>
                                </div>
                            <? } ?>

                            <br />
                            
                            <table class="rubrique">
                                <tr>
                                    <td>Taille :</td>
                                    <td> 320x240 </td>
                                    <td><a class="lienAjax" href="camera?threadId=<?php echo $this->threadId; ?>&threadSize=320x240" target="content"><input type="radio" name="videoSize" <?php if($this->threadWidth=='320') echo "checked"?>/></a></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td> 640x480 </td>
                                    <td><a class="lienAjax" href="camera?threadId=<?php echo $this->threadId; ?>&threadSize=640x480" target="content"><input type="radio" name="videoSize" <?php if($this->threadWidth=='640') echo "checked"?>/></a></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>Plein Ecran (1024)</td>
                                    <td><a href="camera/fullScreen?threadId=<?php echo $this->threadId; ?>" target="_blank"><img src="imgweb/screen.png" /></a></td>
                                </tr>
                            </table>
                                                                                   
                            <?php
                                if ( $this->threadTracking)
                                {                       
                            ?>
                            <br />
                            <table class="rubrique">
                                <th colspan="3">
                                    Track auto : 
                                    <?php
                                        if ( $this->threadAutoTrack == "enabled")
                                        {
                                            ?><a class="lienAjax" href="camera/autoTrack?threadId=<?php echo $this->threadId; ?>&auto=0" target="content">On</a><?php                       
                                        } else
                                        {
                                            ?><a class="lienAjax" href="camera/autoTrack?threadId=<?php echo $this->threadId; ?>&auto=1" target="content">Off</a><?php
                                        }                
                                    ?>
                                </th>
                                <tr>
                                  <td></td><td><a class="lienAjax" href="camera/moveTrack?threadId=<?php echo $this->threadId; ?>&pan=0&tilt=10" target="content"><img src="imgweb/arrow_up.png" /></a></td><td></td>
                                </tr>
                                <tr>
                                  <td><a class="lienAjax" href="camera/moveTrack?threadId=<?php echo $this->threadId; ?>&pan=-10&tilt=0" target="content"><img src="imgweb/arrow_left.png" /</a></td>
                                  <td><a class="lienAjax" href="camera/centerTrack?threadId=<?php echo $this->threadId; ?>" target="content"><img src="imgweb/arrow_in.png" /</a></td>
                                  <td><a class="lienAjax" href="camera/moveTrack?threadId=<?php echo $this->threadId; ?>&pan=10&tilt=0" target="content"><img src="imgweb/arrow_right.png" /</a></td>
                                </tr>
                                <tr>
                                  <td></td><td><a class="lienAjax" href="camera/moveTrack?threadId=<?php echo $this->threadId; ?>&pan=0&tilt=-10" target="content"><img src="imgweb/arrow_down.png" /</a></td><td></td>
                                </tr>        
                            </table>
                            <?php 
                                } 
                            ?>        
                            
                            <br />
                            
                            <?php  if ( $this->userAllowed ) { ?>
                                <table class="rubrique">
                                    <tr><td><img src="imgweb/film.png" /></td><td><b><?php echo $this->fileCount; ?></b> sequence(s) en cours : </td><td><a class="lienAjax" href="sequences?threadId=<?php echo $this->threadId;?>&selectedType=nonlu" target="content">Consulter</a></td></tr>
                                    <tr><td><img src="imgweb/film_folder.png" /></td><td><b><?php echo $this->archiveCount; ?></b> sequence(s) archivee(s) : </td><td><a class="lienAjax" href="sequences?threadId=<?php echo $this->threadId;?>&selectedType=lu" target="content">Consulter</a></td></tr>
                                    <tr><td><img src="imgweb/pictures.png" /></td><td><b><?php echo $this->snapshotsCount;?></b> photo(s) prise(s) : </td><td><a class="lienAjax" href="snapshots?threadId=<?php echo $this->threadId; ?>" target="content">Consulter</a></td></tr>
                                </table>
                            <?php } ?>
            
                </div>
                <div class='boxbottomright'><div class='boxbottomleft'></div></div>
            </div>  
            <!-- Fin du panel des fonctions -->    
        </td>
    </tr>
</table>